//
//  HomeActivityCell.m
//  PaiLeXiongProject
//
//  Created by 小獾科技 on 2017/8/22.
//  Copyright © 2017年 小獾科技. All rights reserved.
//

#import "HomeActivityCell.h"
#import "HomeActivityCollectionViewCell.h"
@interface HomeActivityCell ()


@end

@implementation HomeActivityCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])
    {
        self.backgroundColor = ColorFrom16(0xeef4f7);
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 10, GWIDTH , 127 - 20)];
        view.backgroundColor = ColorWhite;
        [self addSubview:view];
        
        _firstBtn = [UIButton buttonWithType:UIButtonTypeCustom];
//        [_firstBtn setImage:IMAGE(@"home_activity_1") forState:0];
        [view addSubview:_firstBtn];
        [_firstBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(view).offset(10);
            make.left.equalTo(view).offset(10);
            make.width.equalTo(@(view.frame.size.width / 2 - 15));
            make.height.equalTo(@87);
        }];
        
        _secondBtn = [UIButton buttonWithType:UIButtonTypeCustom];
//        [_secondBtn setImage:IMAGE(@"home_activity_2") forState:0];
        [view addSubview:_secondBtn];
        [_secondBtn mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.equalTo(view).offset(10);
            make.left.equalTo(_firstBtn.mas_right).offset(10);
            make.right.equalTo(view).offset(-10);
            make.height.equalTo(@87);
        }];
}
    return self;
}

- (void)configWithImage:(NSArray *)imageArray
{
    [_firstBtn sd_setImageWithURL:imageArray.firstObject forState:0];
    [_secondBtn sd_setImageWithURL:imageArray.lastObject forState:0];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
